﻿<%@ Control Language="c#" AutoEventWireup="false" Inherits="Web.Control.WWW.Resources.ResList" %>
<div class="common">
	<div id="new_body">
		<div id="body_900">
				<div class="submenu3"></div>
			<div id="body_left"></div>
			<div id="body_main">
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle"><h1><%=ResPage.PageTitle%></h1></div>
							<div class="submenuN_button"></div>
						</div>
					</div>
				</div>
				<div>
					<ul class="sort_sel">
						<li class="first"><span><a href="/resources/"><%=GetText("C0068")%></a></span></li>
						<li class="selATags"><span><%=ResPage.PageTitle%></span></li>
					</ul>
					<div class="clear"></div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Right">
						<div class="Center9001content">
							<!--Category loop start-->
							<div class="resources_list_area">
								<div class="ad_site">
								<script type="text/javascript"><!--
								google_ad_client = "pub-2873751441352197";
								/* unit468x60A */
								google_ad_slot = "8543394701";
								google_ad_width = 468;
								google_ad_height = 60;
								//-->
								</script>
								<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
								</div>
								<asp:Repeater ID="rptCatForRes" runat="server">
								<ItemTemplate>
								<h3><%#Eval("Catname")%></h3>
								<div class="margin20D"><a name='<%#Eval("ID","Cat{0}") %>'></a>
									<asp:Repeater ID="rptResbyCat" runat="server" DataSource='<%#GetResDataSource(Eval("ID"))%>'>
										<HeaderTemplate>
										<ul class="resource">
										</HeaderTemplate>
										<ItemTemplate>
											<li><a href='<%#("/resources/resredirect.htm?resID="+Eval("ResID").ToString()+Eval("Url","&ReturnUrl={0}").ToString())%>' target='_blank' ><%#Eval("Name") %></a> - <%#Eval("Description") %></li>
										</ItemTemplate>
										<FooterTemplate>
										</ul>
										</FooterTemplate>
									</asp:Repeater>
									<%#GetResDataSource(Eval("ID")).Count==0? GetText("RS018"):""%>
								</div>
								</ItemTemplate>
								</asp:Repeater>
								<div style="margin-bottom: 10px; border: 2px #eeeeee solid; padding: 10px; background-color: #f7f7f7">
									<h3><%=GetText("RS006",new string[]{GetLanguageText(LearnL)})%>:</h3>
									<ul class="resource">
									<asp:Repeater ID="rptOtherLang" runat="server">
									<ItemTemplate>
										<li><a href='<%#("/resources/"+Eval("PageID").ToString()+"/learn_"+Eval("LanguageLearn").ToString()+"_in_"+Eval("BaseLanguage").ToString()+".htm")%>'><%#Eval("PageTitle") %></a> <span class="grey10"><%#GetText("C2019",new string[]{GetLanguageText(Eval("BaseLanguage").ToString())})%></span> <span dir="ltr">(<%#Eval("PageResourcesCount")%>)</span></li>
									</ItemTemplate>
									</asp:Repeater>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<div class="Center9001Left">
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4>Category</h4>
								<div class="layer_contentA5">
								<asp:Repeater ID="rptCat" runat="server">
								<HeaderTemplate>
								<div class="resources_admin_cate">
									<ul class="">
										</HeaderTemplate>
										<ItemTemplate>
										<li><a href='<%#Eval("ID","#Cat{0}") %>'><%#Eval("Catname")%></a></li>
										</ItemTemplate>
										<FooterTemplate>
									</ul>
									<div class="clear"></div>
								</div>
								</FooterTemplate>
								</asp:Repeater>
								</div>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA"><H4><%=GetText("M0011")%></H4>
								<%=GetText("RS020")%><br /><%=GetText("RS004",new string[]{GetLanguageText(LearnL),GetLanguageText(SpeakL)})%><br />
								<p><strong><%=GetText("RS021")%>:</strong><br /><%=ResPage.Description%></p>
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA"><H4><%=GetText("RS033")%></H4>
							<p><input name="shareUrl" id="shareUrl" type="text" value="" onfocus="this.select()" class="common180" /></p>
							<p><%=GetText("RS034")%>:</p>
							<p><script type="text/javascript">
							addthis_url    = window.location.href;  
							addthis_title  = "<%=ResPage.PageTitle%>"; 
							addthis_pub    = "italki.com";
							document.getElementById("shareUrl").value = addthis_url;
							</script>
							<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script></p>
							</div>
						</div>						
						<div class="right_layerA">
							<div class="layer_contentA"><H4><%=GetText("RS022")%></H4>
								<p><%=GetText("RS023")%></p>
								<p><img src="/Images/icon_recommand.gif" align="absmiddle" /> <a href="#" onclick="RDivSH();return false;"><%=GetText("RS024")%></a></p>
								<div id="RDiv" style="display: none">
									<div id="SubSuccess" style="display: none">
										<div class="MessagePanel4">
											<div style="margin-left:10px"><%=GetText("RS047")%></div>
										</div>
									</div>
								    <div id="SubSailure" style="display: none">
										<div class="MessagePanel4">
											<div style="margin-left:10px"><%=GetText("RS048")%></div>
										</div>
									</div>
									<div><strong><%=GetText("RS025")%>:</strong><br /><input id="txtUrl" type="text" class="common180" /><span name="__V_S" vt="0" elt1="txtUrl" reg="\http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=~]*)?" style="color:Red;display:none" class="validMsg"><br /><%=GetText("RS027")%></span></div>
									<div><strong><%=GetText("RS028")%></strong><br /><textarea id="txtDes" class="common180" cols="" rows=""></textarea><span name="__V_S" vt="0" elt1="txtUrl" reg="[\s\S]{0,1000}" style="color:Red;display:none" class="validMsg"><br /><%=GetText("C1010")%></span></div>
									<div><input id="btnSave" type="button" value="<%=GetText("C0045")%>" class="button" onclick="Save()" /></div>
								</div>								
							</div>
						</div>
						<div class="right_layerA">
							<div class="layer_contentA"><H4><%=GetText("RS036")%></H4>
							<p>
							<asp:Repeater ID="rptAdmin" runat="server">
								<ItemTemplate>
									<div style="margin-bottom:10px">
										<div style="float: left; width: 60px" class="pic50"><a class="photo_50" href='/<%#Eval("MemberNo") %>.htm' ><%#"<img src='"+(Eval("Avatar").ToString()==""?"/Images/no_pic.gif":Eval("Avatar").ToString())+"' >"%></a></div>
										<div style="float: right; width: 120px; overflow: hidden; white-space: nowrap"><img src='/Images/<%#((bool)Eval("Online"))?"Online":"offline"%>.gif' title="Offline" /> <a href='/<%#Eval("MemberNo") %>.htm' ><%#Eval("NickName") %></a><br />From <%#GetCountryText(Eval("Nationality").ToString()) %></div>
										<div class="clear"></div>
									</div>
								</ItemTemplate>
							</asp:Repeater>
							</p>
							<%if(AdminList.Count==0){ %>
							<div><%=GetText("RS030")%> <br /><%=GetText("RS031")%> <a href="/static/contact.htm"><%=GetText("M0016")%></a></div>
							<%} %>
							<%if(IsAdmin==1) {%>
							<p><img src="/images/icon_common_edit.gif" align="absmiddle" /> <a href="/resources/ResListAdmin.htm?learn=<%=LearnL %>&speak=<%=SpeakL %>&PageID=<%=ResPage.PageID %>"><%=GetText("RS032")%></a></p>
							<%} %>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>
<%--
var Page_Validators =  new Array($get("valtxtUrl"), $get("valtxtDes"));
var TmpObj = $get("valtxtUrl");
TmpObj.controltovalidate = "txtUrl";
TmpObj.errormessage = "<b><%=GetText("RS027")%></b>";
TmpObj.display = "None";
TmpObj.evaluationfunction = "RegularExpressionValidatorEvaluateIsValid";
TmpObj.validationexpression = "\\http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w- ./?%&=~]*)?";

TmpObj = $get("valtxtDes");
TmpObj.controltovalidate = "txtDes";
TmpObj.errormessage = "<b><%=GetText("C1010")%></b>";
TmpObj.display = "None";
TmpObj.evaluationfunction = "RegularExpressionValidatorEvaluateIsValid";
TmpObj.validationexpression = "[\\s\\S]{0,1000}";

var Page_ValidationActive = false;
if (typeof(ValidatorOnLoad) == "function") {
    ValidatorOnLoad();
}
function ValidatorOnSubmit() {
    if (Page_ValidationActive) {
        return ValidatorCommonOnSubmit();
    }
    else {
        return true;
    }
}
function CreateValid()
{
    $create(AjaxControlToolkit.ValidatorCalloutBehavior, 
    {"closeImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/close.gif","highlightCssClass":"validatorCalloutHighlight",
     "id":"valtxtUrl","warningIconImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/alert-small.gif"}, null, null, $get("valtxtUrl"));
    $create(AjaxControlToolkit.ValidatorCalloutBehavior, 
    {"closeImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/close.gif","highlightCssClass":"validatorCalloutHighlight",
     "id":"valtxtDes","warningIconImageUrl":"<%=RootPath%>Scripts/AjaxTools/images/alert-small.gif"}, null, null, $get("valtxtDes"));    
}
<span id="valtxtUrl" style="color: Red; display: none;" class="red10"></span>
<span id="valtxtDes" style="color: Red; display: none;" class="red10"></span>
--%>
<script>
var Memberno = "<%=memberno %>";
var PageID = <%=ResPage.PageID %>;
var LanLearn = "<%=LearnL %>";
var LanBase = "<%=SpeakL %>";
</script>